﻿


using System;
using System.Collections.Generic;
using System.Collections;
using System.Runtime.Serialization;

namespace UFIDA.U9.Cust.SH.SHFastShipBP
{
	/// <summary>
	/// 销售价格 DTO :自定义的数据传输类型 
	/// 
	/// </summary>
	public  partial class PriceDTO  : UFSoft.UBF.Business.DTOBase
	{
		#region Constructor
		
		/// <summary>
		/// Constructor
		/// </summary>
		public PriceDTO(){
			initData();
		}
		private void initData()
		{
					ItemID = 0; 
					Price = 0m; 
					ProductCost = 0m; 
					MarkCost = 0m; 
					TransportCost = 0m; 
					StoreCost = 0m; 
		
					CustomerID = 0; 
		

		}

		#endregion
		
		#region Properties
			/// <summary>
		/// 料品ID (该属性可为空,但有默认值)
		/// 销售价格.Misc.料品ID
		/// </summary>
		/// <value>System.Int64</value>
		public System.Int64 ItemID
		{
			get	
			{	
				return (System.Int64)base.GetValue("ItemID",typeof(System.Int64));
			}

			 set	
			{
				base.SetValue("ItemID",value);
			}
		}
				/// <summary>
		/// 单价 (该属性可为空,但有默认值)
		/// 销售价格.Misc.单价
		/// </summary>
		/// <value>System.Decimal</value>
		public System.Decimal Price
		{
			get	
			{	
				return (System.Decimal)base.GetValue("Price",typeof(System.Decimal));
			}

			 set	
			{
				base.SetValue("Price",value);
			}
		}
				/// <summary>
		/// 产品费 (该属性可为空,但有默认值)
		/// 销售价格.Misc.产品费
		/// </summary>
		/// <value>System.Decimal</value>
		public System.Decimal ProductCost
		{
			get	
			{	
				return (System.Decimal)base.GetValue("ProductCost",typeof(System.Decimal));
			}

			 set	
			{
				base.SetValue("ProductCost",value);
			}
		}
				/// <summary>
		/// 品牌费 (该属性可为空,但有默认值)
		/// 销售价格.Misc.品牌费
		/// </summary>
		/// <value>System.Decimal</value>
		public System.Decimal MarkCost
		{
			get	
			{	
				return (System.Decimal)base.GetValue("MarkCost",typeof(System.Decimal));
			}

			 set	
			{
				base.SetValue("MarkCost",value);
			}
		}
				/// <summary>
		/// 物流费 (该属性可为空,但有默认值)
		/// 销售价格.Misc.物流费
		/// </summary>
		/// <value>System.Decimal</value>
		public System.Decimal TransportCost
		{
			get	
			{	
				return (System.Decimal)base.GetValue("TransportCost",typeof(System.Decimal));
			}

			 set	
			{
				base.SetValue("TransportCost",value);
			}
		}
				/// <summary>
		/// 仓储费 (该属性可为空,但有默认值)
		/// 销售价格.Misc.仓储费
		/// </summary>
		/// <value>System.Decimal</value>
		public System.Decimal StoreCost
		{
			get	
			{	
				return (System.Decimal)base.GetValue("StoreCost",typeof(System.Decimal));
			}

			 set	
			{
				base.SetValue("StoreCost",value);
			}
		}
				/// <summary>
		/// 正特价 (该属性可为空,且无默认值)
		/// 销售价格.Misc.正特价
		/// </summary>
		/// <value>System.String</value>
		public System.String PriceType
		{
			get	
			{	
				return (System.String)base.GetValue("PriceType",typeof(System.String));
			}

			 set	
			{
				base.SetValue("PriceType",value);
			}
		}
				/// <summary>
		/// 客户ID (该属性可为空,但有默认值)
		/// 销售价格.Misc.客户ID
		/// </summary>
		/// <value>System.Int64</value>
		public System.Int64 CustomerID
		{
			get	
			{	
				return (System.Int64)base.GetValue("CustomerID",typeof(System.Int64));
			}

			 set	
			{
				base.SetValue("CustomerID",value);
			}
		}
				/// <summary>
		/// 料号 (该属性可为空,且无默认值)
		/// 销售价格.Misc.料号
		/// </summary>
		/// <value>System.String</value>
		public System.String ItemCode
		{
			get	
			{	
				return (System.String)base.GetValue("ItemCode",typeof(System.String));
			}

			 set	
			{
				base.SetValue("ItemCode",value);
			}
		}
		
		#endregion	
		#region Multi_Fields
									
		#endregion 

		#region ModelResource
		/// <summary>
		/// 销售价格的显示名称资源--已经废弃，不使用.
		/// </summary>
		public string Res_TypeName {	get {return "" ;}	}
		/// <summary>
		/// 料品ID的显示名称资源 -- 已经废弃，不使用.
		/// </summary>
		public string Res_ItemID　{ get { return "";　}　}
		/// <summary>
		/// 单价的显示名称资源 -- 已经废弃，不使用.
		/// </summary>
		public string Res_Price　{ get { return "";　}　}
		/// <summary>
		/// 产品费的显示名称资源 -- 已经废弃，不使用.
		/// </summary>
		public string Res_ProductCost　{ get { return "";　}　}
		/// <summary>
		/// 品牌费的显示名称资源 -- 已经废弃，不使用.
		/// </summary>
		public string Res_MarkCost　{ get { return "";　}　}
		/// <summary>
		/// 物流费的显示名称资源 -- 已经废弃，不使用.
		/// </summary>
		public string Res_TransportCost　{ get { return "";　}　}
		/// <summary>
		/// 仓储费的显示名称资源 -- 已经废弃，不使用.
		/// </summary>
		public string Res_StoreCost　{ get { return "";　}　}
		/// <summary>
		/// 正特价的显示名称资源 -- 已经废弃，不使用.
		/// </summary>
		public string Res_PriceType　{ get { return "";　}　}
		/// <summary>
		/// 客户ID的显示名称资源 -- 已经废弃，不使用.
		/// </summary>
		public string Res_CustomerID　{ get { return "";　}　}
		/// <summary>
		/// 料号的显示名称资源 -- 已经废弃，不使用.
		/// </summary>
		public string Res_ItemCode　{ get { return "";　}　}
		#endregion 




		#region EntityData exchange
		
		#region  Do SerializeKey -ForDTOType
		//反序化Key到Data的ID中　－－由FromEntityData自动调用，不处理层次关系
		private void DeSerializeKey(PriceDTOData data)
		{
		









		}

		#endregion 
		
		/// <summary>
		/// Copy Entity From EntityData
		/// </summary>
		public void FromEntityData(PriceDTOData data)
		{
			this.FromEntityData(data,new Hashtable());
		}
		//used by ubf..
		public void FromEntityData(PriceDTOData data,IDictionary dict)
		{
			if (data == null)
				return;
			if (dict == null ) dict = new Hashtable() ;
			dict[data] = this;
			DeSerializeKey(data);
		
			this.ItemID = data.ItemID;

			this.Price = data.Price;

			this.ProductCost = data.ProductCost;

			this.MarkCost = data.MarkCost;

			this.TransportCost = data.TransportCost;

			this.StoreCost = data.StoreCost;

			this.PriceType = data.PriceType;

			this.CustomerID = data.CustomerID;

			this.ItemCode = data.ItemCode;

		}

		/// <summary>
		/// Create EntityData From Entity
		/// </summary>
		public PriceDTOData ToEntityData()
		{
			return ToEntityData(null,new Hashtable());
		}
		/// <summary>
		/// Create EntityData From Entity - used by ubf 
		/// </summary>
		public PriceDTOData ToEntityData(PriceDTOData data, IDictionary dict){
			if (data == null)
				data = new PriceDTOData();
			if (dict == null ) 
				dict = new Hashtable() ;
			else
            {
                if (dict.Contains(this))
                {
                    data = (PriceDTOData)dict[this];
                    return data;
                }
            }
			dict[this] = data;
		
			data.ItemID = this.ItemID;

			data.Price = this.Price;

			data.ProductCost = this.ProductCost;

			data.MarkCost = this.MarkCost;

			data.TransportCost = this.TransportCost;

			data.StoreCost = this.StoreCost;

			data.PriceType = this.PriceType;

			data.CustomerID = this.CustomerID;

			data.ItemCode = this.ItemCode;

			return data ;
		}

		#endregion	
	}	
	
}